package com.app.miwawa.api.esm.entity.contract;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

import org.framework.common.api.entity.CommonEntityUUID;
import org.springframework.format.annotation.DateTimeFormat;

import com.fasterxml.jackson.annotation.JsonFormat;

/**
 * 退费
 * <p>描述: </p>
 * <p>Company: Professional</p>
 * @author chanlong(陈龙)
 * @date 2016年2月9日 下午11:15:28
 * @version 1.0.2016
 */
@Entity @Table(name = "TB_ESM_CONTRACT_REFUND")
public class Refund extends CommonEntityUUID {

	/** serialVersionUID(long):. */
	private static final long serialVersionUID = -3683988252943724138L;

	// 处理类型（终止、退费）
	@Column(name = "type", length = 10, nullable = true)
	private String type;
	
	// 原因（耗课结束、合同到期、违约退费）
	@Column(name = "reason", length = 10, nullable = true)
	private String reason;
	
	// 金额
	@Column(name = "amount", nullable = true)
	private Float amount;
	
	// 备注
	@Column(name = "remark", length = 500, nullable = true)
	private String remark;
	
	// 退费方式
	@Column(name = "payment", length = 10, nullable = true)
	private String payment;
	
	// 处理时间
	@Temporal(TemporalType.DATE)
	@JsonFormat(pattern="yyyy-MM-dd", timezone="GMT+8")
	@DateTimeFormat(pattern="yyyy-MM-dd")
	@Column(name = "create_date", nullable = true)
	private Date createDate;
	
	// 处理人ID
	@Column(name = "user_id", length = 50, nullable = true)
	private String userid;
	
	// 处理人姓名
	@Column(name = "user_name", length = 50, nullable = true)
	private String username;
	
	// 学员ID
	@Column(name = "student_id", length = 50, nullable = true)
	private String studentId;
		
	// 合同ID
	@Column(name = "contract_id", length = 50, nullable = true)
	private String contractId;
	
	// 客户ID
	@Column(name = "customer_id", length = 50, nullable = true)
	private String customerId;
	
	public String getType() {
		return type;
	}

	public void setType(String type) {
		this.type = type;
	}

	public String getReason() {
		return reason;
	}

	public void setReason(String reason) {
		this.reason = reason;
	}

	public Float getAmount() {
		return amount;
	}

	public void setAmount(Float amount) {
		this.amount = amount;
	}

	public String getRemark() {
		return remark;
	}

	public void setRemark(String remark) {
		this.remark = remark;
	}

	public String getPayment() {
		return payment;
	}

	public void setPayment(String payment) {
		this.payment = payment;
	}

	public Date getCreateDate() {
		return createDate;
	}

	public void setCreateDate(Date createDate) {
		this.createDate = createDate;
	}

	public String getUserid() {
		return userid;
	}

	public void setUserid(String userid) {
		this.userid = userid;
	}

	public String getUsername() {
		return username;
	}

	public void setUsername(String username) {
		this.username = username;
	}

	public String getContractId() {
		return contractId;
	}

	public void setContractId(String contractId) {
		this.contractId = contractId;
	}

	public String getCustomerId() {
		return customerId;
	}

	public void setCustomerId(String customerId) {
		this.customerId = customerId;
	}

	public String getStudentId() {
		return studentId;
	}

	public void setStudentId(String studentId) {
		this.studentId = studentId;
	}

}
